package com.whut.community.domain.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class Comment {
    @TableId(value = "comment_id", type = IdType.ASSIGN_ID)
    private Long commentId;

    @TableField(value = "post_id")
    private Long postId;

    @TableField(value = "user_id")
    private Long userId;

    @TableField(value = "parent_comment_id")
    private Long parentCommentId;

    @TableField(value = "reply_to")
    private Long replyTo;

    @TableField(value = "content")
    private String content;

    @TableField(value = "reply_count")
    private Integer replyCount;

    @TableField(value = "like_count")
    private Integer likeCount;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField("is_deleted")
    @TableLogic(value = "0", delval = "1")
    private Integer isDeleted;
}
